package Test_Connexion;
import java.sql.Connection;
import java.sql.DriverManager;

public class Connect_2 {
    public static void main(String[] args) {
         try {
                Class.forName("com.mysql.jdbc.Driver");
                System.out.println("Loaded driver");
                Connection con = DriverManager.getConnection("jdbc:mysql://localhost/mysql?user=root&password=abc");
                System.out.println("Connected to MySQL ");
                con.close();
         } 
         catch (Exception ex) {
                ex.printStackTrace();
         }
    }
}
